\(\int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx\) [217]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 18 \[ \int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx=\frac {\log \left (1+\sin ^2(c+d x)\right )}{2 d} \]

[Out]

1/2*ln(1+sin(d*x+c)^2)/d

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {4419, 266} \[ \int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx=\frac {\log \left (\sin ^2(c+d x)+1\right )}{2 d} \]

[In]

Int[Cos[c + d*x]/(Csc[c + d*x] + Sin[c + d*x]),x]

[Out]

Log[1 + Sin[c + d*x]^2]/(2*d)

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4419

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Sin[c*(a + b*x)], x]}, Dist[d/(b
*c), Subst[Int[SubstFor[1, Sin[c*(a + b*x)]/d, u, x], x], x, Sin[c*(a + b*x)]/d], x] /; FunctionOfQ[Sin[c*(a +
 b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Cos] || EqQ[F, cos])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\sin (c+d x)\right )}{d} \\ & = \frac {\log \left (1+\sin ^2(c+d x)\right )}{2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.11 \[ \int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx=\frac {\log (3-\cos (2 (c+d x)))}{2 d} \]

[In]

Integrate[Cos[c + d*x]/(Csc[c + d*x] + Sin[c + d*x]),x]

[Out]

Log[3 - Cos[2*(c + d*x)]]/(2*d)

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.94

method result size
derivativedivides \(\frac {\ln \left (\cos \left (d x +c \right )^{2}-2\right )}{2 d}\) \(17\)
default \(\frac {\ln \left (\cos \left (d x +c \right )^{2}-2\right )}{2 d}\) \(17\)
risch \(-i x -\frac {2 i c}{d}+\frac {\ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-6 \,{\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{2 d}\) \(41\)
parallelrisch \(\frac {-\ln \left (\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )+\ln \left (\sqrt {-4+4 \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}\right )}{d}\) \(49\)
norman \(-\frac {\ln \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )}{2 d}\) \(53\)

[In]

int(cos(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/2/d*ln(cos(d*x+c)^2-2)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx=\frac {\log \left (-\cos \left (d x + c\right )^{2} + 2\right )}{2 \, d} \]

[In]

integrate(cos(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="fricas")

[Out]

1/2*log(-cos(d*x + c)^2 + 2)/d

Sympy [F]

\[ \int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx=\int \frac {\cos {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + \csc {\left (c + d x \right )}}\, dx \]

[In]

integrate(cos(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

Integral(cos(c + d*x)/(sin(c + d*x) + csc(c + d*x)), x)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89 \[ \int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx=\frac {\log \left (\sin \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]

[In]

integrate(cos(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="maxima")

[Out]

1/2*log(sin(d*x + c)^2 + 1)/d

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89 \[ \int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx=\frac {\log \left (\sin \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]

[In]

integrate(cos(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="giac")

[Out]

1/2*log(sin(d*x + c)^2 + 1)/d

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89 \[ \int \frac {\cos (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx=\frac {\ln \left ({\sin \left (c+d\,x\right )}^2+1\right )}{2\,d} \]

[In]

int(cos(c + d*x)/(sin(c + d*x) + 1/sin(c + d*x)),x)

[Out]

log(sin(c + d*x)^2 + 1)/(2*d)